home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / pidentd / SCO-PATCH < prev   
Text File  |  1995-07-30  |  3KB  |  115 lines

  1. *** pidentd-2.6.1/src/kernel/sco32_42+5.c    Mon Jun  5 08:03:22 1995
  2. --- pidentd-2.6.1+/src/kernel/sco32_42+5.c    Sun Jul 30 06:52:52 1995
  3. ***************
  4. *** 30,35 ****
  5. --- 30,45 ----
  6.    * 4. This notice may not be removed or altered.
  7.    */
  8.   
  9. + /*
  10. +  * MODIFICATION HISTORY
  11. +  *
  12. +  * 95/06/05 created by Victor A. Abell <abe@cc.purdue.edu>
  13. +  *
  14. +  * 95/07/30 modified by Bela Lubkin <belal@sco.com>
  15. +  *     -- Added code to find the real socket head, which may be hidden
  16. +  *        behind an in-kernel rlogind/telnetd stream head.
  17. +  */
  18.   #include <stdio.h>
  19.   #include <fcntl.h>
  20.   #include <nlist.h>
  21. ***************
  22. *** 65,70 ****
  23. --- 75,86 ----
  24.   #include <sys/net/route.h>
  25.   #include <sys/netinet/in_pcb.h>
  26.   
  27. + #if    sco>=500
  28. + #define    _INKERNEL
  29. + #include <sys/net/iknt.h>
  30. + #undef    _INKERNEL
  31. + #endif
  32.   /*
  33.    * This confusing sequence of redefinitions of xdevmap allows the sizing
  34.    * of the copy of the kernel's xdevmap[] table to be dynamic, based on the
  35. ***************
  36. *** 137,142 ****
  37. --- 153,163 ----
  38.       { "xdevmap",    0, 0, 0, 0, 0 },
  39.   #define    X_XDEV                    6
  40.   
  41. + #if    sco>=500
  42. +     { "ikntrinit",    0, 0, 0, 0, 0 },
  43. + #define    X_IKNTR                    7
  44. + #endif /* sco>=500 */
  45.       { NULL,         0, 0, 0, 0, 0 }
  46.   };
  47.   
  48. ***************
  49. *** 167,172 ****
  50. --- 188,196 ----
  51.           ERROR1("main: nlist(%s)", N_UNIX);
  52.       for (err = i = 0; Nl[i].n_name; i++) {
  53.           if (Nl[i].n_value == (long)NULL) {
  54. + #if    sco>=500
  55. +             if (i == X_IKNTR) continue; /* Ok if not linked in */
  56. + #endif /* sco>=500 */
  57.               if (syslog_flag)
  58.                   syslog(LOG_ERR, "no kernel address for %s",
  59.                       Nl[i].n_name);
  60. ***************
  61. *** 271,276 ****
  62. --- 295,303 ----
  63.       struct queue *q, qb;
  64.       off_t sa, spa;
  65.       struct user *u;
  66. + #if    sco>=500
  67. +     iknt_t ikb;
  68. + #endif /* sco>=500 */
  69.   /*
  70.    * Search the kernel's TCP control block chain for one whose local and foreign
  71.    * addresses match.
  72. ***************
  73. *** 297,302 ****
  74. --- 324,341 ----
  75.           if (kread((off_t)q, (char *)&qb, sizeof(qb)))
  76.               return(-1);
  77.       }
  78. + #if    sco>=500
  79. +     /*
  80. +      * If this is an in-kernel rlogind/telnetd stream head, follow
  81. +      * its private pointer back to the original stream head which
  82. +      * actually contains the socket address.
  83. +      */
  84. +     if (qb.q_qinfo && qb.q_qinfo == (struct qinit *)Nl[X_IKNTR].n_value) {
  85. +         if (kread((off_t)qb.q_ptr, (char *)&ikb, sizeof(ikb)))
  86. +             return(-1);
  87. +         qb.q_ptr = ikb.ik_oqptr;
  88. +     }
  89. + #endif /* sco>=500 */
  90.       if (qb.q_ptr == (caddr_t)NULL)
  91.           return(-1);
  92.   /*
  93. *** pidentd-2.6.1/Makefile    Mon Jun  5 13:49:08 1995
  94. --- pidentd-2.6.1+/Makefile    Sat Jul 29 17:44:19 1995
  95. ***************
  96. *** 344,350 ****
  97.   #
  98.   sco32_5:
  99.       @echo "Building for SCO 3.2v5.0.0..."
  100. !     @(cd src ; $(MAKE) CC="$(CC)" LDFLAGS="$(LDFLAGS)" LIBS="$(GLIBS) -lsocket -lc_s" CFLAGS="$(CFLAGS) -Dsco=500 $(GDEFS)" MAKE=$(MAKE) KSRC=sco32_42+5 in.identd)
  101.   
  102.   #
  103.   # For Sony MIPS BSD...
  104. --- 344,350 ----
  105.   #
  106.   sco32_5:
  107.       @echo "Building for SCO 3.2v5.0.0..."
  108. !     @(cd src ; $(MAKE) CC="$(CC)" LDFLAGS="$(LDFLAGS) -belf" LIBS="$(GLIBS) -lsocket " CFLAGS="$(CFLAGS) -O3 -Kspace -Dsco=500 $(GDEFS)" MAKE=$(MAKE) KSRC=sco32_42+5 in.identd)
  109.   
  110.   #
  111.   # For Sony MIPS BSD...
  112.